<{include file="public/header.html"}> 
<script src="/static/public/jquery.pagination.js" type="text/javascript" charset="utf-8"></script>
		<!--main部分-->
		<div class="x-main-upper w1180-con">
			<!--main--左边--logo/tab-->
			<{include file="public/user_nav.html"}> 
				<!--main--右边--banner-->
				<div class="main-right">
					<div class="mright-content p10">
						<!--头像、昵称、等级-->
						<{include file="public/user_top.html"}> 		
						<div class="clear"></div>
						<!--站内消息-->
						<div class="cash66 mt15">
							<!--title-->
							<div class="title">
								<div class="vertical"></div><p class="title66">站内消息</p>
							</div>
							<div class="information bjf p20">
								<div class="information-con">
									<div class="I_Select">
										<span class="I_S_Box left">
                                                                                    <input type="button" value="全选" class="SelectAll" data-type="1" data-status="0"/>
										</span> 全选
										<input type="button" value="标记为已读" class="Read" onclick="set_mark_read(this,'sms');"/>
										<input type="button" value="删除" class="Delete" onclick="set_mark_del(this);"/>
									</div>
									<ul class="Inftxt" id="letterContainer">
									</ul>
								</div>
								<!-- navigation holder -->
                                                                <div class="holder" id="letter_pagination">
								</div>
							</div>
						</div>
                                                <script type="text/javascript">
                                                    $(function(){
                                                        showLetterPage(0);
                                                    });
                                                    function handleLetterPage(resp){
                                                        var str = "";
                                                        var totalCount = resp.data.totalCount;
                                                        if(totalCount == 0){
                                                            str += "<li>暂无数据</li>"
                                                        }
                                                        var str = resp.data.data;
                                                        $("#letterContainer").html(str);
                                                        letterPage(totalCount,resp.data.pageIndex);
                                                    }
                                                    function showLetterPage(pageIndex,jq){
                                                        var params = {};
                                                        params.pageIndex = pageIndex;
                                                        doPageRequest("/user/my_sms.html",params,false,handleLetterPage,errorCallback);
                                                    }

                                                    function letterPage(total,pageIndex){
                                                        $("#letter_pagination").pagination(total, { //recordCount在后台定义的一个公有变量，通过从数据库查询记录进行赋值，返回记录的总数
                                                        callback: showLetterPage,  //点击分页时，调用的回调函数
                                                        prev_text: '<',  //显示上一页按钮的文本
                                                        next_text: '>',  //显示下一页按钮的文本
                                                        link_to:"javascript:void(0);",
                                                        items_per_page:6,  //每页显示的项数
                                                        num_display_entries:6,  //分页插件中间显示的按钮数目
                                                        current_page:pageIndex,  //当前页索引
                                                        num_edge_entries:2  //分页插件左右两边显示的按钮数目
                                                        });
                                                    }
                                                    
                                                    function set_mark_del(obj){
                                                        var _T_obj = $(obj).parent().parent().children().find("input[type='checkbox']"),num=0,ids="";
                                                        _T_obj.each(function(){
                                                            var _Q_obj=$(this),_J_obj=$(this)[0];
                                                            if(_J_obj.checked){
                                                                num ++;
                                                                ids += _Q_obj.attr("data-id")+",";
                                                            }
                                                        });
                                                        if(num == 0){layer.msg("至少选择一个选项",{icon:0,shift:6,offset:300,time:2000});return;}
                                                        if(ids != ""){
                                                            ids=ids.substring(0,ids.length-1);
                                                            var params={};
                                                            params.ids=ids;
                                                            layer.confirm('删除后将无法恢复，确定要删除吗？', {
                                                                title:"小6提示",icon:3,offset:300,
                                                                btn: ['删除','取消'] //按钮
                                                            }, function(){
                                                                doRequest("/user/set_sms_del.html",params,true,function(){
                                                                    layer.msg("成功删除",{icon:1,offset:300,time:2000},function(){
                                                                        window.location.reload();
                                                                    });
                                                                },function(){});
                                                            }, function(){
                                                            });
                                                        }
                                                    }
                                                </script>
						<div class="cash66 mt15">
							<!--title-->
							<div class="title">
								<div class="vertical"></div><p class="title66">系统公告</p>
							</div>
							<div class="information bjf p20">
								<div class="information-con">
									<div class="I_Select">
										<span class="I_S_Box left">
											<input type="button" value="全选" class="SelectAll" data-type="2" data-status="0">
										</span> 全选
										<input type="button" value="标记为已读" class="Read" onclick="set_mark_read(this,'notice');"/>
									</div>
									<ul class="Inftxt" id="noticeContainer">
									</ul>
								</div>
								<!-- navigation holder -->
								<div class="holder" id="notice_pagination">
								</div>
							</div>
						</div>
                                                <script type="text/javascript">
                                                    $(function(){
                                                        showNoticePage(0);
                                                        $('.information .information-con ul.Inftxt li .txt .txt-title .content').css('width','355px');
                                                    });
                                                    function handleNoticePage(resp){
                                                        var str = "";
                                                        var totalCount = resp.data.totalCount;
                                                        if(totalCount == 0){
                                                            str += "<li>暂无数据</li>"
                                                        }
                                                        var str = resp.data.data;
                                                        $("#noticeContainer").html(str);
                                                        noticePage(totalCount,resp.data.pageIndex);
                                                    }
                                                    function showNoticePage(pageIndex,jq){
                                                        var params = {};
                                                        params.pageIndex = pageIndex;
                                                        doPageRequest("/user/notice_sms.html",params,false,handleNoticePage,errorCallback);
                                                    }

                                                    function noticePage(total,pageIndex){
                                                        $("#notice_pagination").pagination(total, { //recordCount在后台定义的一个公有变量，通过从数据库查询记录进行赋值，返回记录的总数
                                                        callback: showNoticePage,  //点击分页时，调用的回调函数
                                                        prev_text: '<',  //显示上一页按钮的文本
                                                        next_text: '>',  //显示下一页按钮的文本
                                                        link_to:"javascript:void(0);",
                                                        items_per_page:6,  //每页显示的项数
                                                        num_display_entries:6,  //分页插件中间显示的按钮数目
                                                        current_page:pageIndex,  //当前页索引
                                                        num_edge_entries:2  //分页插件左右两边显示的按钮数目
                                                        });
                                                    }
                                                </script>
					</div>
				</div>
			</div>
		</div>
		<div class="clear"></div>
<{include file="public/footer.html"}> 		